{include file="public/header" /}
<body>
<div class="panel admin-panel margin-top">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>修改分类</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="">
      <div class="form-group">
        <div class="label">
          <label>上级分类：</label>
        </div>
        <div class="field">
          <select name="parent_id" style="padding:5px 15px; border:1px solid #ddd;">
            <option value="0">请选择分类</option>
            {foreach name='cate' item='v'}
            <option value="{$v['cate_id']}" {if $v['cate_id']==$one['parent_id']}selected{/if}>{$v['cate_name']}

            {foreach name="$v['next']" item='vv' empty=''}
            <option value="{$vv['cate_id']}" {if $vv['cate_id']==$one['parent_id']}selected{/if}>|------{$vv['cate_name']}</option>
            {/foreach}

            </option>
            {/foreach}

          </select>
          <div class="tips">不选择上级分类默认为一级分类</div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>分类标题：</label>
        </div>
        <div class="field">
          <input type="hidden" name="cate_id" value="{$one['cate_id']}">
          <input type="text" class="input w50" name="cate_name" value="{$one['cate_name']}"/>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>排序：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="sort_order" value="{$one['sort_order']}"  data-validate="number:排序必须为数字" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>是否展示：</label>
        </div>
        <div class="field">
          是<input type="radio" name="if_show" value="1" {if $one['if_show']==1}checked{/if}>
          否<input type="radio" name="if_show" value="0" {if $one['if_show']==0}checked{/if}>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body></html>
